<%--                                                                       --%>
<%-- Copyright (c) 2001-2003 BroadVision, Inc.  All rights reserved.       --%>
<%--                                                                       --%>
<%-- This software is copyrighted. Under the copyright laws, this software --%>
<%-- may not be copied, in whole or in part, without prior written consent --%>
<%-- of BroadVision, Inc. or its assignees. This software is provided      --%>
<%-- under the terms of a license between BroadVision and the recipient,   --%>
<%-- and its use is subject to the terms of that license.                  --%>
<%--                                                                       --%>
<%-- This software may be protected by one or more U.S. and International  --%>
<%-- patents.  Certain applications of BroadVision One-To-One software are --%>
<%-- covered by U.S. patent 5,710,887.                                     --%>
<%--                                                                       --%>
<%-- TRADEMARKS: BroadVision and BroadVision One-To-One are registered     --%>
<%-- trademarks of BroadVision, Inc., in the United States and the         --%>
<%-- European Community, and are trademarks of BroadVision, Inc., in other --%>
<%-- countries.  The BroadVision logo, is a trademark of BroadVision,      --%>
<%-- Inc., in the United States and other countries.                       --%>
<%--                                                                       --%>

<%@ page language="java" %>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> 
<%@ taglib uri="/WEB-INF/bv-html.tld" prefix="bvhtml" %>

<script language=JavaScript>
<!--

function confirmDeleteAnnouncement()
{
   if (confirm("<bean:message key="cs.confirm.delete.announcement"/>"))
   {
      return true;
   }
   else
   {
      return false;
   }
}

function onClickSwitchPhase(theForm) {
  theForm.displayPhaseId.value = theForm.elements['urlParams.displayPhaseId'].value;
  theForm.submit();
}

// -->
</script>

<!-- Zone 5 starts here.  -->
<table class="zoneFive" width="100%" border="0" cellspacing="0" cellpadding="0" 
         summary="content area">
  <tr>
    <td valign="top">
    
    <div class="pageTitle">
      <%@include file="/cs/microsite/micrositeNaviInfo.jsp" %>
    </div> 
    
    <!--end page title area here-->

<!--  BEGIN form { switch phase } ----------------------------- -->
    <div class="generalWrapRight" align="right">
      <logic:equal name="micrositeNaviInfoView" property="micrositeTemplatePhaseFlag" value="true">
      <html:form method="post" action="/cs/announcementList.do">

          <bvhtml:hiddenList name="micrositeNaviInfoView" property="urlParams" scope="request"/>
          <html:select name="micrositeNaviInfoView" property="urlParams.displayPhaseId" size="1">  
            <bean:define id="allPhasesList" name="announcementListView" property="allPhasesList" />
            <html:optionsCollection name="announcementListView" property="allPhasesList"/>
            <html:option value="0"><bean:message key="cs.phases.all"/></html:option>
          </html:select>&nbsp;    
      
          <input type="button" class="titleButton" 
                 onclick="onClickSwitchPhase(this.form)"
                 value="<bean:message key='button.go'/>" 
                 titleKey="button.go">
        </html:form>
      </logic:equal>
     </div> 
    <!--  END form { switch phase } ----------------------------- -->

    <div class="pageSubtitle">
      <span class="left">
        <bean:message key="cs.announcements.index"/>
      </span>
      <logic:notEqual name="announcementListView" property="isReadOnly" value="true">
        <span class="right">
         <html:form method="post" action="/cs/announcementNew.do">
            <bvhtml:hiddenList name="micrositeNaviInfoView" property="urlParams" scope="request"/>
            <input type="submit" class="titleButton" name="newBtn"
                 value='<bean:message key="button.createNew"/>'>
          </html:form>
        </span>
      </logic:notEqual>
    </div> 

    <!--end title bar here-->

<div class="blockWrap">

<!--start main content area here-->
<!-- Start List here -->
<table class="dataTable" border="0" cellspacing="1" cellpadding="2" summary="Search result table" width="100%">
  <tr class="listHeader"> 
    <th id="Name" align="left" width="35%"><bean:message key="cs.name"/></th>
    <th id="Time" align="left" width="45%"><bean:message key="cs.date"/></th>
    <th id="Action" align="left" width="15%"><bean:message key="cs.actions"/></th>
  </tr>
 
  <!--start announcements iteration here-->

  <logic:iterate id="oneAnn" name="announcementListView" 
         property="announcementDTOList" indexId="index">

    <tr class='<%=index.intValue() %2 == 0 ? "listEven" : "listOdd"%>'> 
      <td headers="Name" align="left">
        <html:link page="/cs/announcementView.do" name="oneAnn" property="urlParams">
              <bean:write name="oneAnn" property="name"/>
        </html:link><br>
      </td>
      <td headers="Time" align="left">
        <bean:write name="oneAnn" property="creationTime" formatKey="format.date.medium"/> 
      </td>
      
      <td headers="Action" nowrap align="left">
        <logic:notEqual name="oneAnn" property="isReadOnly" value="true">
          <logic:equal name="oneAnn" property="isOwner" value="true">
            <html:link page="/cs/announcementEdit.do" name="oneAnn" property="urlParams">
              <html:img page="/cs/images/action/icon_edit.gif" styleClass="actionIcon" altKey="cs.image.alt.edit" border="0"/>
            </html:link>
            <html:link page="/cs/announcementDelete.do" name="oneAnn" property="urlParams" onclick="return confirmDeleteAnnouncement()">
              <html:img page="/cs/images/action/icon_delete.gif" styleClass="actionIcon" altKey="cs.image.alt.delete" border="0"/>
            </html:link>
          </logic:equal>
        </logic:notEqual>
     </td>         
    </tr>
  </logic:iterate>
      <logic:equal name="announcementListView" property="announcementDTOList.empty" value="true">
        <tr class="listOdd">
          <td align="center" colspan="5">
            <bean:message key="cs.collaboration.noAnnouncements"/>
          </td>
        </tr>
      </logic:equal>

  

  <!--end announcements alteration here-->
 
</table>

</div>

 </td>
  </tr>
</table>
<!--end zone 5 content here -->  
